From: Paul Eggert Date: Tue, 14 Jun 2011 20:09:52 +0000 (-0700) Subject: * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~3446^2~14 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=8fb5a3bfd96775bd6a9112f3cfa0b71a1f13a5c5;p=emacs.git * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now. --- diff --git a/src/ChangeLog b/src/ChangeLog index 5aaefe675e8..9debf2f7355 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,11 +1,13 @@ 2011-06-14 Paul Eggert + * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now. + Variadic C functions now count arguments with ptrdiff_t. This partly undoes my 2011-03-30 change, which replaced int with size_t. Back then I didn't know that the Emacs coding style prefers signed int. Also, in the meantime I found a few more instances where arguments - were being counted with int, which may be too narrow, or EMACS_INT, which - may be too wide. + were being counted with int, which may truncate counts on 64-bit + machines, or EMACS_INT, which may be unnecessarily wide. * lisp.h (struct Lisp_Subr.function.aMANY) (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Arg counts are now ptrdiff_t, not size_t. diff --git a/src/doprnt.c b/src/doprnt.c index f5e31153628..195598c07ea 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -118,10 +118,6 @@ along with GNU Emacs. If not, see . */ another macro. */ #include "character.h" -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif - #ifndef DBL_MAX_10_EXP #define DBL_MAX_10_EXP 308 /* IEEE double */ #endif diff --git a/src/eval.c b/src/eval.c index 65cd87cd8ed..eff50a4de52 100644 --- a/src/eval.c +++ b/src/eval.c @@ -32,10 +32,6 @@ along with GNU Emacs. If not, see . */ #include "xterm.h" #endif -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif - /* This definition is duplicated in alloc.c and keyboard.c. */ /* Putting it in lisp.h makes cc bomb out! */